package com.mall.controller;
import com.mall.db.service.CategoryService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
@Controller
@RequestMapping("/category/ud")
public class CategoryUDController {
    @Resource(name = "categoryService")
    private CategoryService cs;
    @RequestMapping("/categoryEdit/{id}")
    public String categoryEdit(@PathVariable(name="id")int id , ModelMap mmap){
        mmap.addAttribute("c",cs.getById(id));
        return "/views/category/categoryEdit";
    }


}
